var status = -1;

function start() {
    status = -1;
    action(1, 0, 0)
}

function action(d, c, b) {
    if (d === 0 && status !== 0) {
        status--
    } else {
        status++
    }
    var a = -1;
    if (status <= a++) {
        cm.dispose()
    } else {
        if (status === a++) {
            if (cm.isQuestFinished(25000)) {
                cm.dispose();
                return
            }
            cm.curNodeEventEnd(true);
            cm.setInGameDirectionMode(true, true, false);
            cm.fieldEffect_PlayBGM("Bgm00.img/Silence", 0, 0);
            cm.playVideoByScript("phantom.avi")
        } else {
            if (status === a++) {
                while (cm.getLevel() < 10) {
                    cm.getPlayer().levelUp()
                }
                if (cm.getLevel() <= 10) {
                    cm.changeJob(2400)
                }
                cm.forceCompleteQuest(25000);
                cm.teachSkill(20031211, -1, 0);
                cm.teachSkill(20031212, -1, 0);
                cm.setInGameDirectionMode(false, false);
                cm.dispose()
            }
        }
    }
};